package com.dxx.cloud.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dxx.cloud.admin.module.entity.UserEntity;
import com.dxx.cloud.admin.module.request.MerchantCheckPasswordRequest;
import com.dxx.cloud.admin.module.request.ShopCheckPasswordRequest;
import com.dxx.cloud.admin.module.request.UserListRequest;
import com.dxx.cloud.admin.module.response.UserResponse;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户 服务类
 * </p>
 *
 * @author dh
 * @since 2025-06-06
 */
public interface IUserService extends IService<UserEntity> {
    /**
     * id和姓名map
     * @param ids
     * @return
     * @throws Exception
     */
    Map<Long,String> idMapName(List<Long> ids);

    /**
     * 查询用户列表
     * @param request
     * @return
     * @throws Exception
     */
    List<UserResponse> list(UserListRequest request);

    /**
     * 根据商户id和密码查询商户用户
     * @param request
     * @return
     * @throws Exception
     */
    UserResponse selectMerByPassword(MerchantCheckPasswordRequest request);

    /**
     * 根据商户id和密码查询商户用户
     * @param request
     * @return
     * @throws Exception
     */
    UserResponse selectShopByPassword(ShopCheckPasswordRequest request);

    UserEntity login(String mobile,String pwd);

    boolean sendVerificationCode(String mobile);

    UserEntity loginByCode(String mobile, String code);
}
